<?php

require(dirname(__FILE__) . "/sfFinder.class.php");

define("ROOT_DIR", dirname(__FILE__) . "/..");
define("DATA_DIR", ROOT_DIR . "/data");
define("CLASSES_DIR", ROOT_DIR . "/classes");

function __autoload($class) {
	$files = sfFinder::type('file')->name("$class.class.php")->in(CLASSES_DIR);
	if(!count($files))
		throw new Exception("Cannot find class definition for $class");
	require($files[0]);
}